package com.mall.service;

import com.mall.controller.vo.OrderCategoryXse;
import com.mall.controller.vo.OrderVO;
import com.mall.controller.vo.ViewInfo;
import com.mall.entity.Cart;
import com.mall.entity.Order;

import java.util.List;
import java.util.Map;

/**
 * @author xyl
 * @date 2021-03-04 18:56
 */
public interface OrderService {
    String cartToPay(List<Cart> carts);

    String orderToPay(List<Order> orders);

    List<Order> getOrderByNumber(String orderNumber);

    int modifyStatusByOrderNumber(String orderNumber, int status);

    List<OrderVO> listVO(Order order);

    Order getOrderByGoodsIdAndUserId(Integer goodsId, Integer currentUserId);

    int add(Order order);

    int modifyAddressByOrderNumber(Integer addressId, String orderNumber);

    ViewInfo getViewInfo();

    Map<String, Float> getOrderCategoryXse();

    /**
     * 购买后 , 处理库存 订单状态 销量等问题
     * @param orderNumber
     */
    void notifyOrder(String orderNumber);
}
